using System.ComponentModel;
using BTOps;

/// <summary>
/// Summary description for BTReceiveLocationOperations
/// </summary>
[DataObject]
public class BTReceiveLocationOperations
{
    [DataObjectMethod(DataObjectMethodType.Select, true)]
    public BTReceiveLocation[] ListReceiveLocations(string applicationName, string portName)
    {
        Operations btOps = new Operations();
        return btOps.ReceiveLocations(applicationName, portName, "");
    }

    [DataObjectMethod(DataObjectMethodType.Select, false)]
    public BTReceiveLocation[] ReceiveLocationByName(string applicationName, string portName, string name)
    {
        Operations btOps = new Operations();
        return btOps.ReceiveLocations(applicationName, portName, name);
    }

    [DataObjectMethod(DataObjectMethodType.Insert, true)]
    public void CreateReceiveLocation(BTReceiveLocation receiveLocation)
    {
        Operations btOps = new Operations();
        btOps.CreateReceiveLocation(receiveLocation);
    }

    [DataObjectMethod(DataObjectMethodType.Update, true)]
    public void UpdateReceiveLocation(BTReceiveLocation receiveLocation)
    {
        Operations btOps = new Operations();
        btOps.UpdateReceiveLocation(receiveLocation);
    }

    [DataObjectMethod(DataObjectMethodType.Delete, true)]
    public void DeleteReceiveLocation(BTReceiveLocation receiveLocation)
    {
        Operations btOps = new Operations();
        btOps.DeleteReceiveLocation(receiveLocation);
    }
}